import { DataSource } from 'typeorm';
import { AdminEntity } from './entities/admin.entity';
// 提供用户数据库实体类
export const adminUserProviders = [
  {
    provide: 'ADMIN_USER_REPOSITORY',
    useFactory: (connection: DataSource) =>
      connection.getRepository(AdminEntity),
    inject: ['DATABASE_CONNECTION'], //注入数据库依赖
  },
];
